package com.swust.dao;

import com.swust.entity.UserInfo;
import org.springframework.data.r2dbc.repository.Query;
import org.springframework.data.repository.reactive.ReactiveCrudRepository;
import org.springframework.stereotype.Repository;
import reactor.core.publisher.Mono;

@Repository
public interface UserInfoDao extends ReactiveCrudRepository<UserInfo, Long> {

    @Query("SELECT * FROM t_user_info WHERE id = :id and name = :name limit 1")
    Mono<UserInfo> findDateByIdAndName(Long id, String name);
}
